<?php
/**
 *+------------------
 * Lflow
 *+------------------
 * Copyright (c) 2023~2030 gitee.com/liu_guan_qing All rights reserved.
 *+------------------
 * Author: Mr.April(405784684@qq.com)
 *+------------------
 */
declare (strict_types=1);

namespace lflow\helper;

/**
 *
 * Object 处理帮助类
 * @author Mr.April
 * @since  1.0
 */
class ObjectHelper
{

    /**
     * 对象追加
     *
     * @param object $obj1
     * @param object $obj2
     *
     * @return object
     */
    public static function putAll(object $obj1, object $obj2): object
    {
        foreach ($obj2 as $key => $obj) {
            $obj1->$key = $obj;
        }
        return $obj1;
    }
}
